package com.shj.service.impl;

import com.shj.dao.SysChronicdisMapper;
import com.shj.entity.SysChronicdis;
import com.shj.service.SysChronicdisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SysChronicdisServiceImpl implements SysChronicdisService {

    @Autowired
    private SysChronicdisMapper sysChronicdisMapper;

    @Override
    public List<SysChronicdis> findAll() {
        return sysChronicdisMapper.findAll();
    }

    @Override
    public SysChronicdis findById(String id) {
        return sysChronicdisMapper.selectByPrimaryKey(id);
    }

    @Override
    public void add(SysChronicdis sysChronicdis) {
        sysChronicdisMapper.insert(sysChronicdis);
    }

    @Override
    public void edit(SysChronicdis sysChronicdis) {
        sysChronicdisMapper.updateByPrimaryKey(sysChronicdis);
    }

    @Override
    public void delete(String id) {
        sysChronicdisMapper.deleteByPrimaryKey(id);
    }
}
